const mongoose = require('mongoose')
// 创建文档对象
let sessionsschema = new mongoose.Schema({
  userid: {
    type: String,
    required: true,
  },
  name: {
    type: String,
    // unique: true,
    required: true,
    default: '梁伟俊',
    enum: ["梁伟俊", "梁伟杰", "林俊杰"]
  },

  address: {
    type: String,
    required: true,
  },
  phonenumber: {
    type: Number,
    required: true,
  },

})
// 创建文档模型
let model = mongoose.model('sessions', sessionsschema)
module.exports = model